package main

type SEXTYPE int

const (
	SexMan SEXTYPE = iota + 1
	SexGirl
)

//Animal 动物结构定义
type Animal struct {
	age int     // 年龄
	sex SEXTYPE // 性别
}

func (r *Animal) setSex(ty SEXTYPE) {
	r.sex = ty
}

func (r *Animal) info() string {
	str := ""
	if r.sex == SexMan {
		str = "男"
	}else if r.sex == SexGirl {
		str = "女"
	}
	return str
}

func CheckAnimalSex() bool {
	a := Animal{sex: SexMan}
	for i := 0; i < 1000000000; i++ {
		a.setSex(SexMan)
	}
	return a.info() == "男"
}